# -*- coding: utf-8 -*-
#----------------------------------------------
# @note: example system link for test chain
# @author: Andrey Simine/Андрей Симин
# @copyright: (с) 2016 Андрей Симин
#----------------------------------------------
__author__ = 'asimine'

from chainlib.basic_link import BasicLink
from pprint import pprint
import time


class UserLink(BasicLink):

    def __init__(self, context):
        super(UserLink, self).__init__(context)

    def execute(self):
        print("------------------------------------------")
        print("context:")
        pprint(self.context)
        print("------------------------------------------")
        params = self.context['parameters']
        self.log.info(f"Execute command in docker image: {params['image']}")

        self.log.info("Executing command in docker image: done.")
